<?php

/*

Process System Message (systemmessage.pro.php)

*/
ob_start();
include "global.inc.php";

$fetch = fetch("SELECT * FROM messages2 WHERE id = '$id' AND userid = '$userid'");

if (!$fetch[id])
{
	die(header(error("index.php?game=$game","Error processing system message.")));
}
else
{
	if (!$fetch[link])
	{
		$fetch[link] = $HTTP_REFERER;
	}
	else
	{
		$fetch[link] = "$base_url/$fetch[link]";
	}

	mysql_query("DELETE FROM messages2 WHERE id = '$id'");
	die(header("Location: $fetch[link]"));
}

?>